var disposenerlink = "/dbcmsner/api/disposener";

$(function () {

});
/***
 * 执行翻译
 */
function initFY() {
    $("#result_content").html("");
    var fycontent = $("#fy_content").val();
    fycontent = $.trim(fycontent);
    if(fycontent!=""){
        if(fycontent.length>20000){
            alert("字数不能超过20000");
            return false;
        }
        var sel_cq_type =  $("#sel_cq_type").val();

        $.ajax({
            url:disposenerlink,
            contentType:"application/json",
            data:JSON.stringify({
                cncontent:fycontent,
                sel_cq_type:sel_cq_type
            }),
            type:"post",
            cache:false,
            async:false,
            dataType:"json",
            success:function(content){
                var numi = 1;
                var htmlstr = "";
                for (var i in content){
                    var dataarray = content[i];
                    for (var j in dataarray){
                        var dataj = dataarray[j];
                        if(dataj.length>0){
                            htmlstr+="抽取结果"+numi+"："+dataj[0][0]+"\n";
                            numi++;
                        }
                    }
                }
                console.log(htmlstr);
                $("#result_content").val(htmlstr);
            }
        });
    }else {
        alert("请输入翻译内容");
    }
}